<table class="table table-striped " id="list-post">
	<tr>
		<th class="post_title">Title</th>
		<th class="post_cate">Categories</th>
		<th class="post_author">Author</th>
		<th class="post_date">Date</th>
		<th class="post_status">Status</th>
	</tr>
	<?php 
		foreach($data as $item):
	?>
	<tr>
		<td class="post_title">
		<a class="bold" href="post_edit/<?php echo word_limiter($item->post_id, 10); ?>"><?php echo $item->post_title; ?></a>
		<div class="clearfix mgt10">
			<a href="post_edit/<?php echo $item->post_id; ?>">Edit</a> |

			<?php if($item->post_status == 'publish'): ?>
			<a href="javascrip: void('')" data-id="<?php echo $item->post_id; ?>" class="move-trash">Trash</a> |
			<?php endif; ?>

			<?php if($item->post_status == 'trash'): ?>
			<a href="javascrip: void('')" data-id="<?php echo $item->post_id; ?>" class="move-publish">Publish</a> |
			<?php endif; ?>

			<a href="javascrip: void('')" data-id="<?php echo $item->post_id; ?>" class="text-danger delete-post">Delete</a>
		</div>
		</td>
		<td class="post_cate"><?php echo $item->categories; ?></td>
		<td class="post_author"><?php echo $item->post_author; ?></td>
		<td class="post_date"><?php echo convertDate('d/m/Y H:i:s',$item->post_date); ?></td>
		<td class="post_status"><?php echo $item->post_status; ?></td>
	</tr>
	<?php endforeach; ?>
</table>
<?php 
	$lks = '<ul class="pagination clearfix">'.$pagination;
	$lks = str_replace('<a hr', '<li><a hr', $lks);
	$lks = str_replace('</a>', '</a></li>', $lks);
	$lks = str_replace('<strong>', '<li><span class="current">', $lks);
	$lks = str_replace('</strong>', '</span></li>', $lks);
	$lks.='</ul>';
	echo $lks;
?>
